1. Technical Field
The present invention relates generally to an improved data processing system and in particular to an improved method and apparatus for analyzing execution of code in a data processing system. Still more particularly, the present invention relates to a method and apparatus for analyzing performance of a Javabean.
2. Description of Related Art
Object-oriented programming techniques involve the definition, creation, use, and instruction of "objects". These objects are software entities comprising data elements or attributes and methods, which manipulate data elements. Objects also may include data related to events outside of the object to trigger or control methods within the object.
Java is an object oriented programming language and environment focusing on defining data as objects and the methods that may be applied to those objects. Java supports only a single inheritance, meaning that each class can inherit from only one other class at any given time. Java also allows for the creation of totally abstract classes known as interfaces, which allow the defining of methods that may be shared with several classes without regard for how other classes are handling the methods.
The Java virtual machine (JVM) is a virtual computer component that resides in memory. In some cases, the JVM may be implemented in a processor. The JVM allows Java programs to be executed on a different platform as opposed to only the one platform for which the code was compiled. Java programs are compiled for the JVM. In this manner, Java is able to support applications for many types of data processing systems, which may contain a variety of central processing units and operating systems architectures.
To enable a Java application to execute on different types of data processing systems, a compiler typically generates an architecture-neutral file format--the compiled code is executable on many processors, given the presence of the Java run-time system. The Java compiler generates bytecode instructions that are non-specific to a particular computer architecture. These bytecodes are executed by a Java interpreter. A Java interpreter is a module in the JVM that alternately decodes and executes a bytecode or bytecodes.
A Java bean is a reusable component. Various programs in Java may be created by aggregating different Java beans. An applet is an example of a type of program that may be created using Java beans. Applets are programs that are deployed on the Internet or on an Intranet, which are executed by a browser in conjunction with various pages or documents sent to a browser, which is a program used to access documents, such as HTML web pages. It is desirable to optimize the performance of various programs including applets. Currently, a standard means for determining the performance of a given Java bean is unavailable. Presently, the source code for each bean must be modified. This need to modify the bean requires access to the source code for each bean that is to be analyzed.
Therefore, it would be advantageous to have an approved method and apparatus to determine the performance of a Java bean without requiring modification of the bean or access to the source code for the bean.